<template>
  <div class="about">
    <h1>计数： {{ count }}</h1>
    <button @click="add">增加计数</button>
    <button @click="add2">增加计数2</button>
  </div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";

export default {
  computed: {
    ...mapGetters(["count"]),
  },
  methods: {
    ...mapActions("common", ["addCount"]),
    add() {
      this.$store.dispatch("common/addCount");
    },
    add2() {
      this.addCount();
    },
  },
};
</script>
